import React from "react";
import "./index.css";
import App from "./App";
import { createRoot } from "react-dom/client";
import zhCN from "antd/es/locale/zh_CN";

// 导入 BrowserRouter 包 History模式
import { BrowserRouter } from "react-router-dom";
import { ConfigProvider } from "antd";

// 获取根节点
const rootElement = document.getElementById("root");

// 创建 root
const root = createRoot(rootElement);

// 使用 BrowserRouter 包裹 App
root.render(
  <ConfigProvider locale={zhCN}>
    <BrowserRouter>
      <App />
    </BrowserRouter>
  </ConfigProvider>
);
